<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.longtop.com/intelliweb" prefix="e"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<e:View id="view">
    <script type="text/javascript" src="<c:url value='/scripts/indexglobal.js'/>"></script>
	<script type="text/javascript" src="<c:url value='/scripts/skin.js'/>"></script>
    <script type="text/javascript">SkinUtil.getSkin();</script>
    <script type="text/javascript">SkinUtil.getModuleSkin();</script>
    
	<div id="Invisual Controls" style="min-height: 40px; background-color: LemonChiffon;" >
		<e:Dataset id="Dataset_HomeCustom" datasetDefinition="DatasetDefinition_sys.dsd" datasetRef="dataset_HomeCustom" pageSize="10" loadDataCommand="Command_Load">
			<e:Field name="sortNo" dataType="string" label="排序号" maxLength="1" required="true" />
			<e:Field name="id" dataType="string" label="id" maxLength="32" visible="false" />
			<e:Field name="roleId" dataType="string" label="角色ID" maxLength="32" visible="false" />
			<e:Field name="userId" dataType="string" label="用户ID" maxLength="32" visible="false" />
			<e:Field name="funcUrl" dataType="string" label="显示功能" maxLength="100" dropDown="ListDropDown__HomeUrl" required="true" />
			<e:Field name="funcName" dataType="string" label="功能名称" maxLength="100" visible="false" />
			<e:Field name="chartType" dataType="string" label="图形类型" maxLength="100" dropDown="ListDropDown__ChartType" />
		</e:Dataset>
		
		<e:Command id="Command_Save" action="com.longtop.framework.sys.homeCustom.web.HomeCustomListAction" method="saveHomeCustom" submitForm="true" validateRequired="true">
			<e:DatasetInfo name="DatasetInfo1" dataset="Dataset_HomeCustom" alwayRefreshClient="false" submitType="changes"></e:DatasetInfo>
		</e:Command>
		<e:Command id="Command_Search" action="com.longtop.framework.sys.homeCustom.web.HomeCustomListAction" method="searchHomeCustom" submitForm="true" submitFormScope="all">
			<e:DatasetInfo name="DatasetInfo2" dataset="Dataset_HomeCustom" alwayRefreshClient="true" submitType="all"></e:DatasetInfo>
		</e:Command>
		<e:Command id="Command_Load" action="com.longtop.framework.sys.homeCustom.web.HomeCustomListAction" method="loadHomeCustom" showHintInfoOnSuccess="false">
			<e:DatasetInfo name="DatasetInfo3" dataset="Dataset_HomeCustom" alwayRefreshClient="true"></e:DatasetInfo>
		</e:Command>
		
		<e:ListDropDown id="ListDropDown__HomeUrl" fixed="true" autoDropDown="true" onAfterSelect="HomeUrl_onAfterSelect();">
		</e:ListDropDown>
		
		<e:ListDropDown id="ListDropDown__ChartType" autoDropDown="true" fixed="true">
		</e:ListDropDown>
	</div>

<body>
	<e:Page id="ePage" action="com.longtop.framework.sys.homeCustom.web.HomeCustomListAction" style="min-height: 80px; width: 100%; height: 100%;" onAfterLoadPage="ePage_onAfterLoadPage()">
		<table style="width: 100%; height: 100%;" border="0" cellpadding="2" cellspacing="2" width="100%" align="center">
			<tr>
				<td align="left" valign="top">
					<e:Panel id="Panel_Search" style="width: 285px; height: 100%" caption="查询条件" captionIcon="/images/query_win.gif" captionStyle="color:#888888" allowFold="true">
						<table style="text-align: left; width: 100%;" border="0" cellpadding="3" cellspacing="3" width="100%" align="center">
							<tr>
								<td align="right">
									<e:Label id="Label_Name" caption="功能名称"></e:Label>
								</td>
								<td>
									<e:Text id="Text_funcName" style="width:169px;"></e:Text>
								</td>
							</tr>
							<tr>
								<td></td>
								<td>
									<e:Button id="Button_Search" style='height: 22px; width: 70px' caption="查询" command="Command_Search" icon="/images/query.gif" onClick="Button_Search_onClick()"></e:Button>
								</td>
							</tr>
						</table>
					</e:Panel>
				</td>
				<td valign="top" width="100%">
					<e:Panel id="Panel_Result" style="width: 100%; height: 100%" captionStyle="color:#888888" caption="查询结果列表【定义个人用户首页的4个首页功能：前4个才有效!】" captionIcon="/images/list_win.gif">
						<table style="text-align: left; width: 100%;" border="0" cellpadding="3" cellspacing="3" >
							<tr>
								<td>
									<table style="text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td height="27px" width="1%">
												<e:RecordNavigator id="RecordNavigator_HomeCustom" dataset="Dataset_HomeCustom" showNavigatorButton="false">
													<e:RecordButton id="RecordButton_insert" label="新增" onClick="insertRecord" icon="/images/add.gif"></e:RecordButton>
													<e:RecordButton id="RecordButton_delete" label="删除" onClick="deleteRecord" icon="/images/delete.gif"></e:RecordButton>
													<e:RecordButton id="RecordButton_save" label="保存" icon="/images/submit.gif" onClick="RecordButton_save_onClick()"></e:RecordButton>
												</e:RecordNavigator>
											</td>
											<td align="left" width="99%"><e:PageNavigator id="PageNavigator_HomeCustom" dataset="Dataset_HomeCustom" showRecordNum="true"></e:PageNavigator></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td>
									<e:Grid id="Grid_Result" style="width: 100%; height: 450px;" showIndex="false" dataset="Dataset_HomeCustom">
									</e:Grid>
								</td>
							</tr>
						</table>
					</e:Panel>
				</td>
			</tr>
	    </table>
	</e:Page>
</body>
</e:View>
</html>

<script type="text/javascript">
//init
function ePage_onAfterLoadPage(){
}

//查询
function Button_Search_onClick(){
    Command_Search.execute();
}

//保存
function RecordButton_save_onClick(){
    Command_Save.execute();
}

function HomeUrl_onAfterSelect(dropdown,item,text){
	var record = Dataset_HomeCustom.getCurrentRecord();
	record.setValue("funcName", text.element.value);
}
</script>